package cn.tedu.home.wife.service.impl;

import cn.tedu.home.man.service.IHomeWorkService;
import cn.tedu.home.wife.service.IWifeService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class WifeServiceImpl implements IWifeService {

    @DubboReference
    private IHomeWorkService dubboHomeWorkService;

    @Override
    public void clean() {
        // clean方法是老婆让老公扫地刷碗
        dubboHomeWorkService.washFloor();
        dubboHomeWorkService.washTray();
    }
    @Override
    public void eat() {
        String[] foods={"鱼香肉丝","宫爆鸡丁","红烧丸子"};
        dubboHomeWorkService.cooking(foods[(int)(Math.random()*3)]);
    }
}




